<?php

// 观察者
class ObserverStock extends Observer
{
    protected $name;
    protected $subject;

    public function update()
    {
        fwrite(STDOUT, $this->name . ' ' . $this->subject->getAction() . ',关闭股票软件，继续工作。' . "\n");
    }
}